package common.core
{
	public class UIService
	{
		public static const STATU_DESTORY : int = 1;
		public static const STATU_RUNING : int = 2;
		public static const STATU_STOP : int = 3;
		
		private var m_curStatu : int;
		
		public function UIService()
		{
			m_curStatu = 3;
		}
		
		public function get curStatu() : int
		{
			return m_curStatu;
		}
		
		public function destory() : void
		{
			m_curStatu = STATU_DESTORY;
		}
		
		public function start(value:* = null) : void
		{
			m_curStatu = STATU_RUNING;
		}
		
		public function stop() : void
		{
			m_curStatu = STATU_STOP;
		}
		
		public function turn() : void
		{
			if(m_curStatu == STATU_RUNING)
			{
				stop();
			}
			else if(m_curStatu == STATU_STOP)
			{
				start();
			}
		}
	}
}